package chapter06;

/**
 * Created by V5470-I5 on 2016/3/23.
 */
public class RPG1 {
    public static void main(String[] args) {

        SwordsMan swordsMan = new SwordsMan();
        swordsMan.setName("Messi");
        swordsMan.setLevel(1);
        swordsMan.setBlood(200);

        Magician magician = new Magician();
        magician.setName("Suares");
        magician.setLevel(1);
        magician.setBlood(200);

        showBlood(swordsMan);
        showBlood(magician);
    }

    static void showBlood(Role role) {
        System.out.printf("%s 血量,%d%n", role.getName(),role.getBlood());

    }
}


